const app = getApp()
Component({
  properties: {
    text: {
      type: String,
      value: 'Wechat'
    },
    show: {
      type: Boolean,
      value: true
    },
    back: {
      type: Boolean,
      value: false
    },
    home: {
      type: Boolean,
      value: false
    },
  },
  data: {
    // 这里是一些组件内部数据 状态栏高度和文本高度
    someData: {
      statusBarHeight: app.globalData.statusBarHeight,
      titleBarHeight: app.globalData.titleBarHeight
    }
  },
  methods: {
    // 这里是一个自定义方法
    backHome: function () {
       console.log(this.properties);
      wx.reLaunch({
        url: '../index/index',
      })
    },
    goback: function () {
      // console.log(1231123)
      console.log(this.properties);
      
      wx.navigateBack({
        delta: 1,
      })
    },
    toSearch: function () {
      console.log(this.properties);
      
      wx.navigateTo({
        url: '../search/search',
      })
    },
    onLoad:function(){
    }
  }
})